package com.carrot.system.service.impl;

import com.carrot.common.core.domain.entity.SysPointDataset;
import com.carrot.common.exception.ServiceException;
import com.carrot.common.mybatis.BaseServiceImpl;
import com.carrot.system.mapper.SysPointDatasetMapper;
import com.carrot.system.service.IPointDatasetService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class PointDatasetServiceImpl extends BaseServiceImpl<SysPointDatasetMapper, SysPointDataset>
        implements IPointDatasetService {



    @Override
    @Transactional(rollbackFor = ServiceException.class)
    public void add(SysPointDataset pointDataset) {

        this.save(pointDataset);
    }

    @Override
    @Transactional(rollbackFor = ServiceException.class)
    public void update(SysPointDataset pointDataset) {

        this.updateById(pointDataset);
    }

    @Override
    @Transactional(rollbackFor = ServiceException.class)
    public void del(Long id) {

        this.removeById(id);
    }

    @Override
    @Transactional(rollbackFor = ServiceException.class)
    public void batchDel(List<Long> ids) {

        this.removeBatchByIds(ids);

    }
}
